<?php
/**
 * Config stores all configuration for the application
 * 
 * @package    Lazy Framework
 * @subpackage util
 * @author     Eduardo Marcolino <eduardo.marcolino@gmail.com>
 * @copyright  (c) 2010 Eduardo Marcolino <eduardo.marcolino@gmail.com>
 */

class Config
{
	protected static $config = array();
	
	public static function getAll()
	{
		return self::$config;
	}
	
	public static function has($name)
	{
		return array_key_exists($name, self::$config);
	}

	public static function get($name, $default = null)
	{
		return isset(self::$config[$name]) ? self::$config[$name] : $default;
	}
	
	public static function set($name, $value)
	{
		self::$config[$name] = $value;
	}

	public static function putAll($parameters = array())
	{
		self::$config = array_merge(self::$config, $parameters);
	}
}